Optimal. Leaf size=258 \[ -\frac {7 (11 A-8 B+5 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 a^2 d}+\frac {5 (30 A-21 B+14 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 a^2 d}+\frac {5 (30 A-21 B+14 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 a^2 d}-\frac {7 (11 A-8 B+5 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 a^2 d}+\frac {(30 A-21 B+14 C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 a^2 d}-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 258, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4197, 3120,
3056, 2827, 2715, 2719, 2720} \begin {gather*} \frac {5 (30 A-21 B+14 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 a^2 d}-\frac {7 (11 A-8 B+5 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 a^2 d}-\frac {(11 A-8 B+5 C) \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x)}{3 a^2 d (\cos (c+d x)+1)}+\frac {(30 A-21 B+14 C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 a^2 d}-\frac {7 (11 A-8 B+5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{15 a^2 d}+\frac {5 (30 A-21 B+14 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 a^2 d}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {9}{2}}(c+d x)}{3 d (a \cos (c+d x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3056
Rule 3120
Rule 4197
Rubi steps
\begin {align*} \int \frac {\cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx &=\int \frac {\cos ^{\frac {7}{2}}(c+d x) \left (C+B \cos (c+d x)+A \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx\\ &=-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {\cos ^{\frac {7}{2}}(c+d x) \left (-\frac {3}{2} a (3 A-3 B+C)+\frac {1}{2} a (13 A-7 B+7 C) \cos (c+d x)\right )}{a+a \cos (c+d x)} \, dx}{3 a^2}\\ &=-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \cos ^{\frac {5}{2}}(c+d x) \left (-\frac {7}{2} a^2 (11 A-8 B+5 C)+\frac {3}{2} a^2 (30 A-21 B+14 C) \cos (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {(7 (11 A-8 B+5 C)) \int \cos ^{\frac {5}{2}}(c+d x) \, dx}{6 a^2}+\frac {(30 A-21 B+14 C) \int \cos ^{\frac {7}{2}}(c+d x) \, dx}{2 a^2}\\ &=-\frac {7 (11 A-8 B+5 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 a^2 d}+\frac {(30 A-21 B+14 C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 a^2 d}-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {(7 (11 A-8 B+5 C)) \int \sqrt {\cos (c+d x)} \, dx}{10 a^2}+\frac {(5 (30 A-21 B+14 C)) \int \cos ^{\frac {3}{2}}(c+d x) \, dx}{14 a^2}\\ &=-\frac {7 (11 A-8 B+5 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 a^2 d}+\frac {5 (30 A-21 B+14 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 a^2 d}-\frac {7 (11 A-8 B+5 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 a^2 d}+\frac {(30 A-21 B+14 C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 a^2 d}-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {(5 (30 A-21 B+14 C)) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{42 a^2}\\ &=-\frac {7 (11 A-8 B+5 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 a^2 d}+\frac {5 (30 A-21 B+14 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 a^2 d}+\frac {5 (30 A-21 B+14 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 a^2 d}-\frac {7 (11 A-8 B+5 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 a^2 d}+\frac {(30 A-21 B+14 C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 a^2 d}-\frac {(11 A-8 B+5 C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 6.88, size = 2174, normalized size = 8.43 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 513, normalized size = 1.99
method | result | size |
default | \(-\frac {\sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-2 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (750 A \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+1617 A \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-525 B \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-1176 B \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+350 C \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+735 C \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (750 A \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+1617 A \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-525 B \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-1176 B \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+350 C \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+735 C \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+960 A \left (\sin ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-2016 A -672 B \right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2608 A +896 B +560 C \right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-5932 A +2296 B -2660 C \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6184 A -3682 B +2940 C \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-1839 A +1197 B -875 C \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{210 a^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(513\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.81, size = 445, normalized size = 1.72 \begin {gather*} \frac {2 \, {\left (30 \, A \cos \left (d x + c\right )^{4} - 6 \, {\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (61 \, A - 28 \, B + 35 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (961 \, A - 658 \, B + 455 \, C\right )} \cos \left (d x + c\right ) + 750 \, A - 525 \, B + 350 \, C\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 25 \, {\left (\sqrt {2} {\left (30 i \, A - 21 i \, B + 14 i \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} {\left (30 i \, A - 21 i \, B + 14 i \, C\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (30 i \, A - 21 i \, B + 14 i \, C\right )}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 25 \, {\left (\sqrt {2} {\left (-30 i \, A + 21 i \, B - 14 i \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} {\left (-30 i \, A + 21 i \, B - 14 i \, C\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-30 i \, A + 21 i \, B - 14 i \, C\right )}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 147 \, {\left (\sqrt {2} {\left (11 i \, A - 8 i \, B + 5 i \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} {\left (11 i \, A - 8 i \, B + 5 i \, C\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (11 i \, A - 8 i \, B + 5 i \, C\right )}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 147 \, {\left (\sqrt {2} {\left (-11 i \, A + 8 i \, B - 5 i \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} {\left (-11 i \, A + 8 i \, B - 5 i \, C\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-11 i \, A + 8 i \, B - 5 i \, C\right )}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{210 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^{7/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________